package com.luo.pojo.ums.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

import static com.luo.common.validation.RegExpressions.*;
import static com.luo.pojo.valid.user.UserRegistryRegExpression.*;

/**
 * <p>
 * 用户注册信息表
 * </p>
 *
 * @author bin.cn
 * @since 2023-01-19
 */
@Data
public class UserRegistryDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
    @NotNull(message = "请填写用户名！")
    @Pattern(regexp = REGEXP_USER_USERNAME, message =  MESSAGE_USER_USERNAME)
    private String username;

    /**
     * 昵称
     */
    //@NotBlank(message = "请填写昵称")
    private String nickname;

    /**
     * 密码
     */
    @NotNull(message = "请填写密码！")
    @Pattern(regexp = REGEXP_USER_PASSWORD, message =  MESSAGE_USER_PASSWORD)
    private String password;

    /**
     * 确认密码
     */
    @NotNull(message = "请填入确认密码！")
    @Pattern(regexp = REGEXP_USER_PASSWORD, message =  MESSAGE_USER_PASSWORD)
    private String ackPassword;

    /**
     * 邀请码
     */
    @NotNull(message = "请填写邀请码！")
    private String inviteCode;


    /**
     * 性别
     */
    private String sex;

    /**
     * 电话号码
     */
    @Pattern(regexp = REGEXP_USER_PHONE, message =  MESSAGE_USER_PHONE)
    private String phone;




}
